﻿using AutoMapper;
using SCM.API.Write.Application.Command.Check;
using SCM.API.Write.Application.Command.Purchase;
using SCM.API.Write.Application.Command.PurchaseRefund;
using SCM.API.Write.Application.Command.Sale;
using SCM.Domain;
using SCM.Domain.StockCheck;

namespace SCM.API.Write
{
    public class MyMapper:Profile
    {
        public MyMapper() 
        {
            //采购
            CreateMap<AddPurchaseCommand,PurchaseManagementModel>().ReverseMap();
            CreateMap<UpdatePurchaseCommand, PurchaseManagementModel>().ReverseMap();
            //采购退货
            CreateMap<AddPurchaseRefundCommand, PurchaseRefundModel>().ReverseMap();
            CreateMap<UpdatePurchaseRefundCommand, PurchaseRefundModel>().ReverseMap();
            //销售
            CreateMap<AddSaleCommand, SaleManagementModel>().ReverseMap();
            CreateMap<UpdateSaleCommand, SaleManagementModel>().ReverseMap();
            //盘点
            CreateMap<AddCheckCommand, CheckModel>().ReverseMap();
            CreateMap<AddProfitLossCommand, ProfitLossModel>().ReverseMap();
        }
    }
}
